package com.port.serial;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class AppManager {
	private static AppManager s_instance;
	private MainView m_view;
	private Resources m_resources;
	public MainActivity m_activity;
	public int DataReadPeriod = 1000;	
	public boolean LoginState = false;
	public String LoginID = "";
	SensingData sensingData = null;
	
	public static AppManager getInstance() {
		if(s_instance == null) {
			s_instance = new AppManager();
		}
		return s_instance;
	}
	
	void setGameView(MainView _view) {
		m_view = _view;		
	}
	
	void setResources(Resources _resources) {	
		m_resources = _resources;
	}
	
	public MainView getView() {
		return m_view;
	}
	
	public Resources getResources() {
		return m_resources;
	}
	
	public Bitmap getBitmap(int image) {

		return BitmapFactory.decodeResource(m_resources, image);
	}
}